80135: Function test xfi:identifier-value-value

Documentation

Tests of function xfi:identifier-value($identifier as element(xbrli:identifier)) as xs:token

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670689

Test Case Variations


V-01 Returns correct token for concept

Documentation

Inputs

  • schema: entity-tests.xsd
  • instance: entity-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:identifier-value( xfi:identifier( /xbrli:xbrl/concept:c1[1] ) )

    (against file V01)

Outputs

  • Result test: ($result instance of element(*,xs:token) or $result instance of xs:token) and count( $result ) eq 1 and $result eq xs:token('AAA001')

V-02 Entity identifier value for context-2

Documentation

Inputs

  • schema: entity-tests.xsd
  • instance: entity-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:identifier-value( //xbrli:context[@id eq 'context-2']/xbrli:entity/xbrli:identifier )

    (against file V02)

Outputs

  • Result test: ($result instance of element(*,xs:token) or $result instance of xs:token) and count( $result ) eq 1 and $result eq xs:token('AAA002')

V-03 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

  • schema: entity-tests.xsd
  • instance: entity-instance.xml (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:identifier-value( /xbrli:xbrl/xbrli:context[2] )

    (against file V03)

Outputs

  • Error code: xqt-err:XPTY0004

V-04 A sequence of identifiers as argument

Documentation

XPath-defined error for node type incorrect arity of argument.

Inputs

  • schema: entity-tests.xsd
  • instance: entity-instance.xml (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:identifier-value( //xbrli:identifier[true()] )

    (against file V04)

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.